package cn.kys.modules.system.service;


import cn.kys.modules.system.pojo.SubtaskGeom;
import org.locationtech.jts.io.ParseException;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.UnknownHostException;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

public interface MobileService {

    List getTasks();


    List getTasksPC();


    void submitTableContent(String subtaskid, String edit_geoid, String status, String content);

    String submitTableFile(String subtaskid, String edit_geoid, String formcontentname, MultipartFile uploadFile, String alpha, String beta, String gamma, String lat, String lon);

    void updatePhotoInMongoDb(String filename, String alpha, String beta, String gamma, String lat, String lon);

    String submitVideoFile(String subtaskid, String globle_edit_geoid, String formcontentname, MultipartFile[] uploadFile) throws UnknownHostException;
//    String submitVideoFile(String subtaskid, String globle_edit_geoid, String formcontentname, MultipartFile uploadFile);

    void createGeomMongodb(String subtaskid, String polygon, String taskid);

    Map createGeomPG(String subtaskid, String polygon, String taskid);

    void updateGeomMongoDB(String gid, String polygon);

    List queryVideoFile(String subtaskid, String globle_edit_geoid);

    Map updateGeomPG(String subtaskid, String edit_geoid, String polygon);

    List queryTableFile(String subtaskid, String edit_geoid);

    List queryTableFileByCjy(String subtaskid, String edit_geoid);

    Map queryTables(String subtaskid, String caseid);

    void deleteTableFile(String subtaskid, String filename);

    Map deleteGeomById(String edit_geoid, String subtaskid);

    Map deleteGeomAndTableById(String edit_geoid, String subtaskid);

    Map getSubTasksMongoDb(String taskid, String caseid);

    Map getSubTasksPG(String taskid, String caseid) throws IOException, ParseException;

    Map getDetail(String edit_geoid);

    void exportGPSShp(HttpServletRequest request, HttpServletResponse response, String subtaskid);

    void exportGPSShp(HttpServletRequest request, HttpServletResponse response, String subtaskid, String date_start, String date_end);

    void addGPS(String nickname, String create_time, String userid, String username, String taskid, String taskname, String subtaskid, String lat, String lon);

    Map getTimeSpan(String subtaskid);

    List getGPSByTime(String subtaskid, String minTime, String maxTime);

    void syncData(String taskid, String caseid);

    List getCheckedPolygonByTaskId(Integer taskid);

    List queryById(String id, String taskid);

    List queryByDraw(String json);

    List queryByTimeAndTaskId(LocalDateTime startTime, LocalDateTime endTime, String taskid);

    void deleteVideoFile(String subtaskid, String filename);

    List<SubtaskGeom> queryUnCheckedByTaskId(Integer taskid);
}
